<%@ page import="java.util.List" %>
<%@ page import="com.hotel.entity.Reside" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <script type="text/javascript" src="../js/calendar.js"></script>
  <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/hotel/style/style.css"></link>
  <style type="text/css">
    #content div {
      margin: 10px 0px;
    }

    table {
      margin: auto;
      margin-top: 20px;
      width: 700px;
      border-collapse: collapse;
    }

    th, td {
      border: solid 1px #000000;
      padding: 6px 1px;
    }

    .index {
      width: 50px;
      text-align: center;
    }

    .no {
      text-align: center;
    }

    .shortname {
      text-align: center;
    }

    .opt {
      text-align: center;
    }

    #content div {
      text-align: center;
      margin: 0;
      padding: 0;
    }

    #content div.button {
      text-align: center;
      padding-top: 15px;
    }
  </style>
  <title>入住详情</title>
</head>
<body>
<div id="container">
  <div id="header">
    <ul>
      <li>
        <a href="<%=request.getContextPath()%>/hotel/manager/login.jsp"
           onclick="return confirm('确定要退出登录吗？');">退出</a>
      </li>

    </ul>
  </div>
  <div id="menu">
    <ul>
      <li><a href="<%= request.getContextPath() %>/hotel/manager/bookQuery.jsp">客房管理</a></li>
      <li><a href="<%= request.getContextPath() %>/hotel/manager/memberQuery.jsp">会员管理</a></li>
      <li><a href="<%= request.getContextPath() %>/hotel/manager/subscriptionQuery.jsp">订单管理</a></li>
    </ul>
  </div>
  <div id="content">
    <table>
      <colgroup>
        <col class="index" />
        <col class="no" />
        <col class="shortname" />
      </colgroup>
      <tr>
        <th>序号</th>
        <th>入住人</th>
        <th>身份证</th>
      </tr>
      <%
        List<Reside> resideList = (List<Reside>) request.getAttribute("resideList");
        if (resideList != null && !resideList.isEmpty()) {
          int index = 1;
          for (Reside reside : resideList) {
      %>
      <tr>
        <td><div><%= index++ %></div></td>
        <td><div><%= reside.getBookiderName() %></div></td>
        <td><div><%= reside.getIdCard() %></div></td>
      </tr>
      <%
        }
      } else {
      %>
      <tr>
        <td colspan="3">没有找到入住信息</td>
      </tr>
      <%
        }
      %>
    </table>
    <div class="button">
      <input type="button" value="返回" onclick="goBack()">
      <script>
        function goBack() {
          window.history.back();
        }
      </script>
    </div>
  </div>
  <hr />
  <div id="footer">
    <p>本系统做为Java Web教学设计使用。未经允许，不得做为它用，版权所有Allan<br />
      联系方式：javamedia@live.cn</p>
  </div>
</div>
</body>
</html>